<?php
	$conn = mysql_connect('localhost', 'root', 'root');
	$db="sparkDemo";
	$char="utf8";
	if(!$conn){
		$err = new Exception('连接失败');
		throw $err;
	}
	$sql = 'use '.$db;
	mysql_query($sql, $conn);
	$sql = 'set names '.$char;
	mysql_query($sql, $conn);
	$sql = "select mse, rmsle from queue where name='DecisionTreeRegression' order by id desc;";
	$rs = mysql_query($sql, $conn);
	$row = mysql_fetch_row($rs);
	if(!$row)
		echo "0";
	else
		echo json_encode($row);

?>